Add labels for page orientations, also add the fourth one. (#339589)
authorMatthias Clasen <mclasen@redhat.com>
Tue, 16 May 2006 15:23:01 +0000 (15:23 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 16 May 2006 15:23:01 +0000 (15:23 +0000)
2006-05-16  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels
for page orientations, also add the fourth one.  (#339589)

* gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New
icon.

* gtk/Makefile.am: Add it here.

* gtk/gtkstock.[hc]: Add stock items for the page orientations.

ChangeLog
ChangeLog.pre-2-10
docs/reference/ChangeLog
docs/reference/gtk/Makefile.am
docs/reference/gtk/tmpl/gtkstock.sgml
gtk/Makefile.am
gtk/gtkpagesetupunixdialog.c
gtk/gtkstock.c
gtk/gtkstock.h
gtk/stock-icons/24/gtk-orientation-reverse-portrait.png [new file with mode: 0644]

index 71512ccace22e8015bb681ff6c57de1a8c06e685..76c213521da0e2b57693bc24c72ae8294cd3db24 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-05-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels
+       for page orientations, also add the fourth one.  (#339589)
+
+       * gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New
+       icon.
+       
+       * gtk/Makefile.am: Add it here.
+       
+       * gtk/gtkstock.[hc]: Add stock items for the page orientations.
+
 2006-05-16  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtktoolbar.c: added "max-child-expand" style property which
index 71512ccace22e8015bb681ff6c57de1a8c06e685..76c213521da0e2b57693bc24c72ae8294cd3db24 100644 (file)
@@ -1,3 +1,15 @@
+2006-05-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels
+       for page orientations, also add the fourth one.  (#339589)
+
+       * gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New
+       icon.
+       
+       * gtk/Makefile.am: Add it here.
+       
+       * gtk/gtkstock.[hc]: Add stock items for the page orientations.
+
 2006-05-16  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtktoolbar.c: added "max-child-expand" style property which
index 82528ef56cb30380c11adf70d20a139ed846dea7..4c71597bc2f611d0b97eb51c1c2044081f913c98 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/tmpl/gtkstock.sgml: 
+       * gtk/Makefile.am: Add fourth stock orientation. 
+
 2006-05-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/tree_widget.sgml: Fix up example rendering. (#341855, Guillaume
index 62275b487e3109605b300703f61b0a9ca0060028..25634b6fd05ddf6589c10c1b66f08dd4ca39b591 100644 (file)
@@ -215,6 +215,7 @@ HTML_IMAGES = \
        $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png  \
        $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png   \
        $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \
+       $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \
        $(top_srcdir)/gtk/stock-icons/24/gtk-paste.png                  \
        $(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png            \
        $(top_srcdir)/gtk/stock-icons/24/gtk-print.png                  \
index 36ff8036a31022cac922492a288d00f7964bf0a5..4bf46b73becce4518fa8891196a0bf78691b6b0a 100644 (file)
@@ -678,7 +678,7 @@ The "Open" item.
 
 <!-- ##### MACRO GTK_STOCK_ORIENTATION_LANDSCAPE ##### -->
 <para>
-The "Landscape Orientation" icon.
+The "Landscape Orientation" item.
 <inlinegraphic fileref="gtk-orientation-landscape.png" format="PNG"></inlinegraphic>
 </para>
 
@@ -687,7 +687,7 @@ The "Landscape Orientation" icon.
 
 <!-- ##### MACRO GTK_STOCK_ORIENTATION_PORTRAIT ##### -->
 <para>
-The "Portrait Orientation" icon.
+The "Portrait Orientation" item.
 <inlinegraphic fileref="gtk-orientation-portrait.png" format="PNG"></inlinegraphic>
 </para>
 
@@ -696,13 +696,22 @@ The "Portrait Orientation" icon.
 
 <!-- ##### MACRO GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE ##### -->
 <para>
-The "Reverse Landscape Orientation" icon.
+The "Reverse Landscape Orientation" item.
 <inlinegraphic fileref="gtk-orientation-reverse-landscape.png" format="PNG"></inlinegraphic>
 </para>
 
 @Since: 2.10
 
 
+<!-- ##### MACRO GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT ##### -->
+<para>
+The "Reverse Portrait Orientation" item.
+<inlinegraphic fileref="gtk-orientation-reverse-portrait.png" format="PNG"></inlinegraphic>
+</para>
+
+@Since: 2.10
+
+
 <!-- ##### MACRO GTK_STOCK_PASTE ##### -->
 <para>
 The "Paste" item.
index dba3259272969f2a5f832a8e9161d220534c5c97..77f4ada0157b70accea7ef5da0540a83f03f8fe5 100644 (file)
@@ -994,6 +994,7 @@ STOCK_ICONS = \
        stock-icons/24/gtk-open.png                     \
        stock-icons/24/gtk-orientation-reverse-landscape.png \
        stock-icons/24/gtk-orientation-landscape.png    \
+       stock-icons/24/gtk-orientation-reverse-portrait.png     \
        stock-icons/24/gtk-orientation-portrait.png     \
        stock-icons/24/gtk-paste.png                    \
        stock-icons/24/gtk-preferences.png              \
index 007618fea028c830b690689b381c4c434c25e641..820b40c46100614dfc23bec838cf1b118649094d 100644 (file)
@@ -991,12 +991,33 @@ page_name_func (GtkCellLayout   *cell_layout,
       
 }
 
+static GtkWidget *
+create_radio_button (GSList      *group,
+                    const gchar *stock_id)
+{
+  GtkWidget *radio_button, *image, *label, *hbox;
+  GtkStockItem item;
+
+  radio_button = gtk_radio_button_new (group);
+  image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_LARGE_TOOLBAR);
+  gtk_stock_lookup (stock_id, &item);
+  label = gtk_label_new (item.label);
+  hbox = gtk_hbox_new (0, 6);
+  gtk_container_add (GTK_CONTAINER (radio_button), hbox);
+  gtk_container_add (GTK_CONTAINER (hbox), image);
+  gtk_container_add (GTK_CONTAINER (hbox), label);
+
+  gtk_widget_show_all (radio_button);
+
+  return radio_button;
+}
+
 static void
 populate_dialog (GtkPageSetupUnixDialog *ps_dialog)
 {
   GtkPageSetupUnixDialogPrivate *priv = ps_dialog->priv;
   GtkDialog *dialog = GTK_DIALOG (ps_dialog);
-  GtkWidget *table, *label, *combo, *radio_button, *ebox, *image;
+  GtkWidget *table, *label, *combo, *radio_button, *ebox;
   GtkCellRenderer *cell;
 
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
@@ -1007,7 +1028,7 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog)
   gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
   gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
 
-  table = gtk_table_new (4, 4, FALSE);
+  table = gtk_table_new (5, 4, FALSE);
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
   gtk_table_set_col_spacings (GTK_TABLE (table), 12);
   gtk_container_set_border_width (GTK_CONTAINER (table), 5);
@@ -1077,41 +1098,37 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog)
                    GTK_FILL, 0, 0, 0);
   gtk_widget_show (label);
 
-  radio_button = gtk_radio_button_new (NULL);
-  image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_PORTRAIT,
-                                   GTK_ICON_SIZE_LARGE_TOOLBAR);
-  gtk_widget_show (image);
-  gtk_container_add (GTK_CONTAINER (radio_button), image);
+  radio_button = create_radio_button (NULL, GTK_STOCK_ORIENTATION_PORTRAIT);
   priv->portrait_radio = radio_button;
   gtk_table_attach (GTK_TABLE (table), radio_button,
                    1, 2, 3, 4,
-                   0, 0, 0, 0);
-  gtk_widget_show (radio_button);
+                   GTK_EXPAND|GTK_FILL, 0, 0, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), radio_button);
 
-  radio_button = gtk_radio_button_new (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)));
-  image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_LANDSCAPE,
-                                   GTK_ICON_SIZE_LARGE_TOOLBAR);
-  gtk_widget_show (image);
-  gtk_container_add (GTK_CONTAINER (radio_button), image);
-  priv->landscape_radio = radio_button;
+  radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)),
+                                     GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT);
+  priv->reverse_landscape_radio = radio_button;
   gtk_table_attach (GTK_TABLE (table), radio_button,
                    2, 3, 3, 4,
-                   0, 0, 0, 0);
+                   GTK_EXPAND|GTK_FILL, 0, 0, 0);
+
+  radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)),
+                                     GTK_STOCK_ORIENTATION_LANDSCAPE);
+  priv->landscape_radio = radio_button;
+  gtk_table_attach (GTK_TABLE (table), radio_button,
+                   1, 2, 4, 5,
+                   GTK_EXPAND|GTK_FILL, 0, 0, 0);
   gtk_widget_show (radio_button);
 
   gtk_table_set_row_spacing (GTK_TABLE (table), 3, 0);
   
-  radio_button = gtk_radio_button_new (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button)));
-  image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE,
-                                   GTK_ICON_SIZE_LARGE_TOOLBAR);
-  gtk_widget_show (image);
-  gtk_container_add (GTK_CONTAINER (radio_button), image);
+  radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)),
+                                     GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE);
   priv->reverse_landscape_radio = radio_button;
   gtk_table_attach (GTK_TABLE (table), radio_button,
-                   3, 4, 3, 4,
-                   0, 0, 0, 0);
-  gtk_widget_show (radio_button);
+                   2, 3, 4, 5,
+                   GTK_EXPAND|GTK_FILL, 0, 0, 0);
+
 
   priv->tooltips = gtk_tooltips_new ();
 
index 7f50d08bb5f5dbe8405116133c58d4cbdddd193c..3d8cd1d4e5a9376d53d793ac25d77903505d04ea 100644 (file)
@@ -389,6 +389,10 @@ static const GtkStockItem builtin_items [] =
   { GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_OPEN, N_("_Open"), GDK_CONTROL_MASK, 'o', GETTEXT_PACKAGE },
+  { GTK_STOCK_ORIENTATION_LANDSCAPE, N_("Landscape"), 0, 0, GETTEXT_PACKAGE },
+  { GTK_STOCK_ORIENTATION_PORTRAIT, N_("Portrait"), 0, 0, GETTEXT_PACKAGE },
+  { GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE, N_("Reverse landscape"), 0, 0, GETTEXT_PACKAGE },
+  { GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT, N_("Reverse portrait"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_PASTE, N_("_Paste"), GDK_CONTROL_MASK, 'v', GETTEXT_PACKAGE },
   { GTK_STOCK_PREFERENCES, N_("_Preferences"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_PRINT, N_("_Print"), 0, 0, GETTEXT_PACKAGE },
index b0359f50aaa4c85ad4f2e2d66929c3b45505fc3a..22df23ac51cf6bd9271a9f7eb50049ef4f9bd976 100644 (file)
@@ -137,6 +137,7 @@ void          gtk_stock_set_translate_func (const gchar      *domain,
 #define GTK_STOCK_ORIENTATION_PORTRAIT "gtk-orientation-portrait"
 #define GTK_STOCK_ORIENTATION_LANDSCAPE "gtk-orientation-landscape"
 #define GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE "gtk-orientation-reverse-landscape"
+#define GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT "gtk-orientation-reverse-portrait"
 #define GTK_STOCK_PASTE            "gtk-paste"
 #define GTK_STOCK_PREFERENCES      "gtk-preferences"
 #define GTK_STOCK_PRINT            "gtk-print"
diff --git a/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png b/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png
new file mode 100644 (file)
index 0000000..2beec10
Binary files /dev/null and b/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png differ